home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Games / NetHack 3.1.3 / source / include / pcconf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-01  |  3.9 KB  |  156 lines  |  [TEXT/R*ch]

  1. /*    SCCS Id: @(#)pcconf.h    3.1    93/06/28      */
  2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  3. /* NetHack may be freely redistributed.  See license for details. */
  4.  
  5. #ifndef PCCONF_H
  6. #define PCCONF_H
  7.  
  8. #define MICRO        /* always define this! */
  9.  
  10. #ifdef MSDOS        /* some of this material is MS-DOS specific */
  11.  
  12. /*
  13.  *  The following options are somewhat configurable depending on
  14.  *  your compiler.
  15.  *  __GO32__ is defined automatically by the djgpp port of gcc.
  16.  *  Manually define MOVERLAY if you are using Microsoft C version 7
  17.  *  or greater.
  18.  */
  19.  
  20. # if !defined (__GO32__) && !defined(__BORLANDC__) && !defined(AMIGA)
  21. /* #  define OVERLAY         /* MS DOS overlay manager - PGM */
  22. #define MOVERLAY /* Microsoft's MOVE overlay system (MSC >= 7.0) */
  23. # endif
  24.  
  25.  
  26. # ifndef __GO32__
  27. #  define MFLOPPY         /* Support for floppy drives and ramdisks by dgk */
  28. # endif
  29.  
  30. # define SHELL           /* via exec of COMMAND.COM */
  31. /* # define TERMLIB        /* enable use of termcap file /etc/termcap */
  32.             /* or ./termcap for MSDOS (SAC) */
  33.             /* compile and link in Fred Fish's termcap library, */
  34.             /* enclosed in TERMCAP.ARC, to use this */
  35.  
  36. /* # define ANSI_DEFAULT    /* allows NetHack to run without a ./termcap */
  37.  
  38. # define NO_TERMS    /* Allows Nethack to run without ansi.sys by linking */
  39.             /* screen routines into the .exe     */
  40.  
  41. # ifdef NO_TERMS    /* if NO_TERMS select one screen package below */
  42. #define SCREEN_BIOS        /* Use bios calls for all screen control */
  43. /* #define SCREEN_DJGPPFAST    /* Use djgpp fast screen routines       */
  44. # endif
  45.  
  46. /*# define PC9801    /* Allows NetHack to run on NEC PC-9801 machines */
  47.             /* Yamamoto Keizo */
  48.  
  49. # define RANDOM        /* have Berkeley random(3) */
  50.  
  51. #endif /* MSDOS configuration stuff */
  52.  
  53.  
  54. #define PATHLEN        64    /* maximum pathlength */
  55. #define FILENAME    80    /* maximum filename length (conservative) */
  56. #ifndef MICRO_H
  57. # include "micro.h"      /* contains necessary externs for [os_name].c */
  58. #endif
  59.  
  60. #ifdef MFLOPPY
  61. # define FROMPERM        1      /* for ramdisk use */
  62. # define TOPERM          2      /* for ramdisk use */
  63. # define ACTIVE          1
  64. # define SWAPPED         2
  65.  
  66. struct finfo {
  67.     int    where;
  68.     long    time;
  69.     long    size;
  70. };
  71. extern struct finfo fileinfo[];
  72. # define ZFINFO  { 0, 0L, 0L }
  73.  
  74. #endif /* MFLOPPY */
  75.  
  76. /*
  77.  *  The remaining code shouldn't need modification.
  78.  */
  79.  
  80. #ifndef SYSTEM_H
  81. # include "system.h"
  82. #endif
  83.  
  84. #ifndef index
  85. # define index    strchr
  86. #endif
  87. #ifndef rindex
  88. # define rindex    strrchr
  89. #endif
  90.  
  91. #ifndef AMIGA
  92. # include <time.h>
  93. #endif
  94.  
  95. #ifdef RANDOM
  96. /* Use the high quality random number routines. */
  97. # define Rand()    random()
  98. #else
  99. # define Rand()    rand()
  100. #endif
  101.  
  102. #ifndef TOS
  103. # define FCMASK    0660    /* file creation mask */
  104. #endif
  105.  
  106. #include <fcntl.h>
  107.  
  108. #define exit    msexit        /* do chdir first */
  109.  
  110. #ifndef REDO
  111. # undef    Getchar
  112. # define Getchar nhgetch
  113. #endif
  114.  
  115. #ifdef MSDOS
  116. # define TEXTCOLOR /* */
  117. # define PORT_HELP "msdos.hlp"    /* msdos port specific help file */
  118. #endif
  119.  
  120. #ifdef NO_TERMS        /* Sanity check, do not modify this block */
  121. # ifdef TERMLIB
  122. #  ifdef _MSC_VER
  123. #   pragma message("Warning -- TERMLIB defined with NO_TERMS in pcconf.h")
  124. #   pragma message("           Forcing undef of TERMLIB") 
  125. #  endif
  126. # undef TERMLIB
  127. # endif
  128. # ifdef ANSI_DEFAULT
  129. #  ifdef _MSC_VER
  130. #   pragma message("Warning -- ANSI_DEFAULT defined with NO_TERMS in pcconf.h")
  131. #   pragma message("           Forcing undef of ANSI_DEFAULT") 
  132. #  endif
  133. # undef ANSI_DEFAULT
  134. # endif
  135. /* only one screen package is allowed */
  136. # if defined(SCREEN_BIOS) && defined(SCREEN_DJGPPFAST)
  137. #  ifdef _MSC_VER
  138. #   pragma message("Warning -- More than one screen package defined in pcconf.h")
  139. #   pragma message("           Forcing undef of SCREEN_DJGPPFAST") 
  140. #   undef SCREEN_DJGPPFAST    /* Can't use djgpp fast with MSC anyway */
  141. #  else
  142. #   undef SCREEN_BIOS
  143. #  endif
  144. # endif
  145. # define ASCIIGRAPH
  146. # ifdef TEXTCOLOR
  147. # define VIDEOSHADES
  148. # endif
  149. #endif             /* End of sanity check block */
  150.  
  151. #ifdef MSC7_WARN    /* define with cl /DMSC7_WARN    */
  152. #pragma warning(disable:4131)
  153. #endif
  154.  
  155. #endif /* PCCONF_H */
  156.